<?php
 header('Content-Type:text/html; charset=utf-8;');
 $username=$_POST['username'];
 $password=$_POST['password'];
 $mysqli=new mysqli('localhost','root','','test','3306');
 $sql="select * from people where UserName='$username' AND UserPassword='$password'";
 $mysqli->query("SET NAMES UTF8");
 $result=$mysqli->query($sql);
 if($result->num_rows!=0){
  echo '成功';
 }else{
  echo '错误';
 }
 $mysqli->close();
?>